package com.study.concurrent.B_ThreadSynchronizedBasic.c_UseIndependentAttributes;

/**
 * Created by 赵超 on 2017/3/22.
 * 售票处 1
 */
public class TicketOffice1 implements Runnable {
    private Cinema cinema;

    public TicketOffice1(Cinema cinema) {
        this.cinema = cinema;
    }

    @Override
    public void run() {
        cinema.sellTickets1(2);
        cinema.sellTickets2(3);
        cinema.sellTickets1(1);
        cinema.returnTickets1(4);
        cinema.sellTickets2(5);
        cinema.sellTickets1(3);
        cinema.sellTickets1(2);
    }
}
